package com.example.fall_guard_band.pojo.entity;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import lombok.Data;

@Data
public class SensorData {

    private String deviceId;
    private String frameTimestamp;

    private List<RawSensorRecord> accelerometerList;
    private List<RawSensorRecord> gyroscopeList;
    private List<RawSensorRecord> magnetometerList;

    public SensorData() {
        this.accelerometerList = new ArrayList<>();
        this.gyroscopeList = new ArrayList<>();
        this.magnetometerList = new ArrayList<>();
    }
}
/* expect
{
    "accelerometerList":{
        [-8.15625,-0.113281,3.371094],
        [-8.15625,-0.113281,3.371094],
        [-8.15625,-0.113281,3.371094]
    },
    "gyroscope":{
        [],
        []
    }
}

{
  "frame_timestamp": "1734756600123",
  "data": [
    {"ts": "1734756600100", "type": "acc", "x": -0.12, "y": 0.89, "z": 0.33},
    {"ts": "1734756600105", "type": "gyro", "x": 0.01, "y": -0.02, "z": 0.005},
    {"ts": "1734756600110", "type": "acc", "x": -0.13, "y": 0.88, "z": 0.34},
    {"ts": "1734756600115", "type": "mag", "x": 0.22, "y": -0.67, "z": 0.71}
  ]
}

预期：
{
    "timestamp":"1734756600123",
    "accel":{
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:1.0,y:0.1,z:1.2}
    },
    "gyro":{
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:0.0,y:0.1,z:1.2}
    },
    "mag":{
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:0.0,y:0.1,z:1.2},
        {ts:xxx,x:0.0,y:0.1,z:1.2}
    },
}
 */